<template>
  <view class="bottom-nav">
    <view class="nav-item" v-for="(item, index) in navItems" :key="index" @click="navigateToPage(item.url)">
      {{ item.title }}
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      navItems: [
        { title: '首页', url: '/pages/index/index' },
        { title: '商品', url: '/pages/goods/goods' },
        { title: '我的', url: '/pages/mine/mine' }
      ]
    };
  },
  methods: {
    navigateToPage(url) {
      uni.navigateTo({
        url: url
      });
    }
  }
};
</script>

<style scoped>
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  padding: 10px;
  border-top: 1px solid #ccc;
}

.nav-item {
  flex: 1;
  text-align: center;
  font-size: 16px;
  padding: 10px;
}
</style>
